<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Vue.js 全局组件</title>
        
        <script src="../../../js/vue.js"></script>
    </head>
    <body>
        <div id="app">
            <my-component></my-component>
        </div>
        
        <script>
            Vue.component('my-component', {
                template: '<h1>这是一个全局组件</h1>'
            });
            new Vue({
                el: '#app'
            });
        </script>
    </body>
</html>